package com.cmwa.solution.business.register.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.cmwa.solution.base.entity.Page;
import com.cmwa.solution.base.entity.SearchParam;
import com.cmwa.solution.business.register.entity.CustTransferVo;
import com.cmwa.solution.business.register.entity.ProductReceiveVo;
import com.cmwa.solution.business.register.service.SalesCapitalManageService;

/**
 * @author ex-wuh2
 *	销售资金管理控制层
 */
@Controller
@RequestMapping("/business/salesCapitalManage")
public class SalesCapitalManageController {
	
	private final static String JSP_PATH = "business/register/custCapitalMgr/";
	
	@Autowired
	private SalesCapitalManageService salesCapitalManageService;
	
	@RequestMapping("/salesCapitalManageOverView")
	public String salesCapitalManageOverView() {
		return JSP_PATH + "salesCapitalManageOverView";
	}
	
	/**
	 * 	跳转至产品收款明细页面
	 * @return
	 */
	@RequestMapping("/prdReceiveDetailView")
	public String goPrdReceiveDetailPageView() {
		return JSP_PATH + "prdReceiveDetail";
	}
	
	/**
	 * 	跳转至客户划款明细页面
	 * @return
	 */
	@RequestMapping("/custTransferDetailPageView")
	public String goCustTransferDetailPageView() {
		return JSP_PATH + "custTransferDetail";
	}
	
	/**
	 * 		产品收款分页数据详情
	 * @param sp
	 * @return
	 */
	@RequestMapping("/prdReceiveDetailListPage")
	@ResponseBody
	public Page<ProductReceiveVo> prdReceiveDetailListPage(SearchParam sp){
		Page<ProductReceiveVo> listPage = salesCapitalManageService.queryProductReceiveDetailListPage(sp);
		return listPage;
	}
	
	/**
	 * 		客户划款分页数据详情
	 * @param sp
	 * @return
	 */
	@RequestMapping("/custTransferDetailListPage")
	@ResponseBody
	public Page<CustTransferVo> custTransferDetailListPage(SearchParam sp){
		Page<CustTransferVo> listPage = salesCapitalManageService.queryCustTransferDetailListPage(sp);	
		return listPage;
	}
	
}
